﻿using Microsoft.EntityFrameworkCore;
using Project.Yan.Net.DAL.Entities;
using Project.Yan.Net.DAL.Maps;


namespace Project.Yan.Net.DAL
{
    public class AppDbContext: DbContext
    {
        /// <summary>
        /// 
        /// </summary>
        public DbSet<User> Users { get; set; }

        public AppDbContext(DbContextOptions<AppDbContext> options) : base(options)
        {
            // 构造函数实现
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="modelBuilder"></param>
        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            modelBuilder.ApplyConfiguration(new UserMap());
        }
    }
}
